
/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"7A70E49F-E101-4F3F-A4F2-BA0DC25F5A6B"}
 */
function borrar(event) {
	var $res = globals.DIALOGS.showQuestionDialog('Confirmación','¿Desea borrar a '+ nombre + '?','Si','No')
	if ($res == 'Si')
		controller.deleteRecord()
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"0F2408C1-76F4-43F6-AB8F-C03D1BABFE59"}
 */
function onShow(firstShow, event) {
	forms.empresa_dtl.elements.btn_nuevo_contacto.visible = true
}

/**
 * Handle hide window.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"91204F66-DEF8-47AF-987D-051B6A0B0712"}
 */
function onHide(event) {
	forms.empresa_dtl.elements.btn_nuevo_contacto.visible = false
	return true
}
